#pragma once
#ifndef CLIB_IP_H
#define CLIB_IP_H

#include "clib_type.h"
#include <netinet/ip.h>
#include <netinet/ip6.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct ip6_hdr      ip6_hdr_t;

typedef struct iphdr        ip4_hdr_t;

typedef struct ipaddr_s
{
    union
    {
	    u08_t           addr8[16];
	    u16_t           addr16[8];
	    u32_t           addr32[4];
        struct in6_addr addrip6;
    } ipv6;
} ipaddr_t;

#ifdef __cplusplus
}
#endif

#endif